package com.qf.test.application;

import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import org.springframework.data.elasticsearch.annotations.Setting;

@Data
@Accessors(chain = true)
@Document(indexName = "goods_index")
@Setting(shards = 1, replicas = 0)
public class Goods {
    @Id
    private Integer id;
    @Field(type = FieldType.Text, analyzer = "ik_max_word", index = true)
    private String subject;
    @Field(type = FieldType.Text, analyzer = "ik_max_word", index = true)
    private String info;
    @Field(type = FieldType.Double)
    private Double price;
    @Field(type = FieldType.Integer)
    private Integer number;
}
